#! /bin/bash
FP_PARA=/opt/ml/input/data/cfg/predict-args.json
weight=$(cat $FP_PARA | jq -r '.FP_WEIGHT')
img=$(cat $FP_PARA | jq -r '.FP_SOURCE')
conf=$(cat $FP_PARA | jq -r '.CONF')
name=$(cat $FP_PARA | jq -r '.NAME')
output=$(cat $FP_PARA | jq -r '.FP_OUTPUT')
echo $weight
echo $img
mkdir -p /opt/code/runs/detect/$name
python /opt/yolov5/detect.py --source $img --weights $weight --conf $conf --name $name --save-txt
cp -r /opt/yolov5/runs/detect/$name $output
